package com.yi.wood.room;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;

/**
 * Created by moyi on 2018/10/11 16:44
 *
 * @author moyi
 * 2个人对战房间
 */
public class CoupleRoom extends Room {
    private Map<String, Object> defense;
    private Map<String, Object> attack;

    private Long defenseId;

    private Long attackId;

    private LinkedList<Step> record ;

    public CoupleRoom() {
        this.defense = new HashMap<>(20);
        this.attack = new HashMap<>(20);
        this.record = new LinkedList<>();
    }

    public void putDefenseInfo(String key, Object val) {
        defense.put(key, val);
    }

    public void putAttackInfo(String key, Object val) {
        attack.put(key, val);
    }

    public Object getDefenseInfo(String key) {
        return defense.get(key);
    }

    public Object getAttackInfo(String key) {
        return attack.get(key);
    }

    public LinkedList<Step> getRecord() {
        return record;
    }

    public void setRecord(LinkedList<Step> record) {
        this.record = record;
    }

    @Override
    public int hashCode() {
        return this.getNum();
    }

    @Override
    public boolean equals(Object obj) {

        return super.equals(obj);
    }

    public Long getDefenseId() {
        return defenseId;
    }

    public void setDefenseId(Long defenseId) {
        this.defenseId = defenseId;
    }

    public Long getAttackId() {
        return attackId;
    }

    public void setAttackId(Long attackId) {
        this.attackId = attackId;
    }
}
